Skip to content

feat: add reusable fluid definitions for process simulations - #1720

Open
frodehk wants to merge 5 commits into
mainfrom
feat/definitions-fluids
Open

feat: add reusable fluid definitions for process simulations#1720
frodehk wants to merge 5 commits into
mainfrom
feat/definitions-fluids

Conversation

@frodehk

@frodehk frodehk commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds reusable fluid definitions for process simulations under DEFINITIONS.FLUIDS.

  • Supports predefined and user-defined compositions.
  • Allows fluid composition components to be expressions.
  • Lets INLET_STREAMS.FLUID reference a reusable fluid definition.
  • Maps definitions to TimeSeriesFluidModel and materializes a concrete FluidModel for a given period.
  • Extends YAML parsing, reference handling and process simulation mapping.

Legacy FLUID_MODELS remains unchanged for now.


Type of Work

  • Patch: X.Y.Z+1. NEGLIGIBLE visible changes, does not change input or output - OR changes behaviour. Use chore:, refactor: etc
  • Minor: X.Y+1.Z. Minor changes, might ADD new input (YAML), or other backwards-compatible changes. Use feat:, fix:
  • Major: X+1.Y.Z. Major and most likely BREAKING changes, wo. backwards compatibility, or removing temporary backwards compatibility functionality. Use ! or BREAKING:.

See here (internal): https://github.com/equinor/ecalc-internal/discussions/1044

Have you remembered and considered?

  • IF FEAT: I have remembered to update documentation
  • IF FIX OR FEAT: I have remembered to update manual changelog (docs/drafts/next.draft.md)
  • IF BREAKING: I have remembered to update migration guide (docs/docs/migration_guides/)
  • IF BREAKING: I have committed with BREAKING: in footer or ! in header
  • I have added tests (if not, comment why)
  • I have used conventional commits syntax (if you squash, make sure that conventional commit is used)
  • I have included the Github issue nr in the footer!

What is this PR all about?

What else did you consider?

Between the lines?

@frodehk frodehk self-assigned this Aug 14, 2026
@frodehk
frodehk requested a review from a team as a code owner August 14, 2026 09:44

if self.definitions and self.definitions.process_units is not None:
references.extend(self.definitions.process_units.keys())
references.extend(self.definitions.fluids.keys())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to change the if, right? I.e. should still check fluid references when process_units are None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants